// pages/Public/PaymentSuccess/PaymentSuccess.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    
    // 测试数据
    // paybllno: '654894321984321',
    // bizbllno: '000005296548512357',
    // bizcfmdtm: '2021-05-22 12:22:52',
    // amount: 28.6,
    // typid: '03',
    // active:1,

    //步骤条
    steps: [
      {
        text: '①',
        desc: '参加拼团',
      },
      {
        text: '②',
        desc: '支付成功',
      },
      {
        text: '③',
        desc: '等待成团',
      },
      {
        text: '④',
        desc: '拼团成功',
      },
    ],



  },

  Complete:function(){
    var that = this 
    var typid = that.data.typid
    if(typid == '01' || typid == '02'){
      wx.redirectTo({
        url: '/SubpkgMarketing/pages/Coupon/MineCopList/MineCopList',
      })
    }else if(typid == '03'){
      wx.redirectTo({
        url: '/SubpkgMarketing/pages/Activity/Orderlist/Orderlist',
      })
    }
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this
    that.setData({
      paybllno:options.paybllno,
      bllno:options.bllno,
      bizcfmdtm:options.bizcfmdtm,
      amount:options.amount,
      typid:options.typid,

      active:1    //步骤条对应的步骤：支付成功的场景：1
    })

    // console.log(that.data.bizcfmdtm)

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
     var that = this
     var typid = that.data.typid
     
     if(typid == '01' || typid == '02'){
       that.setData({
        button_text: "查看我的券包"
       })
     }else if(typid == '03'){
      that.setData({
        button_text: "查看团购订单列表"
       })
     }
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})